<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <link rel="stylesheet" href="./../helpwin.css">
      <title>MATLAB File Help: prtRvIndependent</title>
   </head>
   <body>
      <!--Single-page help-->
      <table border="0" cellspacing="0" width="100%">
         <tr class="subheader">
            <td class="headertitle">MATLAB File Help: prtRvIndependent</td>
            
            
         </tr>
      </table>
      <div class="title">prtRvIndependent</div>
      <div class="helptext"><pre><!--helptext -->  <span class="helptopic">prtRvIndependent</span>  Independent random variables
 
    RV = <span class="helptopic">prtRvIndependent</span> creates a <span class="helptopic">prtRvIndependent</span> object.
    <span class="helptopic">prtRvIndependent</span> objects enable the training of independent
    versions of a base random variable type on each column of a data
    set.  By default, <span class="helptopic">prtRvIndependent</span> assumes Gaussian distributed
    random variables.
 
    RV = <span class="helptopic">prtRvIndependent</span>('baseRv', VALUE) specifies the type of RV to
    be trained on each column of input data.  VALUE must specify a
    valid prtRV class.  By default the baseRv field is a
    <span class="helptopic">prtRvIndependent</span>.
 
    RV = <span class="helptopic">prtRvIndependent</span>(PROPERTY1, VALUE1,...) creates a
    <span class="helptopic">prtRvIndependent</span> object RV with properties as specified by
    PROPERTY/VALUE pairs.
 
    A <span class="helptopic">prtRvIndependent</span> object inherits all properties from the prtRv
    class. In addition, it has the following properties:
 
    baseRv          - A prtRv object specifying the type of classifier
                      to create independent versions of.
 
    rvArray         - An array of objects of type baseRv that are
                      generated by calling the MLE method.  Can also be
                      manually set to specify particular parameters.
    
   A <span class="helptopic">prtRvIndependent</span> object inherits all methods from the prtRv class. 
   The MLE method can be used to estimate the distribution parameters from
   data.
 
   Example:
 
   dataSet    = prtDataGenUnimodal;   % Load a dataset consisting of 2
                                      % classes
   % Extract one of the classes from the dataSet
   dataSetOneClass = prtDataSetClass(dataSet.getObservationsByClass(1));
 
   mvnRv = <span class="helptopic">prtRvIndependent</span>;            % Create a <span class="helptopic">prtRvIndependent</span>
                                        % object, with mvn components
   mvnRv = mvnRv.mle(dataSetOneClass);  % Compute the maximum
                                        % likelihood estimate from the
                                        % data
 
   indepRv = <span class="helptopic">prtRvIndependent</span>;          %Created an indepednent RV
                                        %(default baseRv is gaussian)
 
   indepRv = indepRv.mle(dataSetOneClass);
 
   subplot(2,2,1); mvnRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('MVN RV Pdf');
 
   subplot(2,2,2); indepRv.plotPdf; 
   hold on; dataSetOneClass.plot;
   title('Independent Gaussian RV Pdf');</pre></div><!--after help --><!--seeAlso--><div class="footerlinktitle">See also</div><div class="footerlink"> <a href="./prtRv.html">prtRv</a>, <a href="./prtRvGmm.html">prtRvGmm</a>, <a href="./prtRvMultinomial.html">prtRvMultinomial</a>, <a href="./prtRvUniform.html">prtRvUniform</a>,
    <a href="./prtRvUniformImproper.html">prtRvUniformImproper</a>, <a href="./prtRvVq.html">prtRvVq</a>, <a href="./prtRvDiscrete.html">prtRvDiscrete</a>
</div>
      <!--Class-->
      <div class="sectiontitle">Class Details</div>
      <table class="class-details">
         <tr>
            <td class="class-detail-label">Superclasses</td>
            <td><a href="./prtRv.html">prtRv</a>, <a href="./prtRvMemebershipModel.html">prtRvMemebershipModel</a></td>
         </tr>
         <tr>
            <td class="class-detail-label">Sealed</td>
            <td>false</td>
         </tr>
         <tr>
            <td class="class-detail-label">Construct on load</td>
            <td>false</td>
         </tr>
      </table>
      <!--Constructors-->
      <div class="sectiontitle"><a name="constructors"></a>Constructor Summary
      </div>
      <table class="summary-list">
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/prtRvIndependent.html">prtRvIndependent</a></td>
            <td class="m-help">Independent random variables&nbsp;</td>
         </tr>
      </table>
      <!--Properties-->
      <div class="sectiontitle"><a name="properties"></a>Property Summary
      </div>
      <table class="summary-list">
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/baseRv.html">baseRv</a></td>
            <td class="m-help">The base random variable&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/dataSet.html">dataSet</a></td>
            <td class="m-help">The training prtDataSet, only stored if verboseStorage is true. &nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/dataSetSummary.html">dataSetSummary</a></td>
            <td class="m-help">Structure that summarizes prtDataSet.&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/isCrossValidateValid.html">isCrossValidateValid</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/isSupervised.html">isSupervised</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/isTrained.html">isTrained</a></td>
            <td class="m-help">Indicates if prtAction object has been trained.&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/name.html">name</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/nameAbbreviation.html">nameAbbreviation</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/plotOptions.html">plotOptions</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/rvArray.html">rvArray</a></td>
            <td class="m-help">The array of random variables&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/showProgressBar.html">showProgressBar</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/userData.html">userData</a></td>
            <td class="m-help">User specified data&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="name"><a href="./prtRvIndependent/verboseStorage.html">verboseStorage</a></td>
            <td class="m-help">Specifies whether or not to store the training prtDataset.&nbsp;</td>
         </tr>
      </table>
      <!--Methods-->
      <div class="sectiontitle"><a name="methods"></a>Method Summary
      </div>
      <table class="summary-list">
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/cdf.html">cdf</a></td>
            <td class="m-help">Output the cdf of the random variable evaluated at the points specified&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/crossValidate.html">crossValidate</a></td>
            <td class="m-help">Cross validate prtAction using prtDataSet and cross validation keys.&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/draw.html">draw</a></td>
            <td class="m-help">Draw random samples from the distribution described by the prtRv object&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/get.html">get</a></td>
            <td class="m-help">get the object properties&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/initializeMixtureMembership.html">initializeMixtureMembership</a></td>
            <td class="m-help">&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/kfolds.html">kfolds</a></td>
            <td class="m-help">Perform K-folds cross-validation of prtAction&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/logPdf.html">logPdf</a></td>
            <td class="m-help">Output the log pdf of the random variable evaluated at the points specified&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/mle.html">mle</a></td>
            <td class="m-help">Compute the maximum likelihood estimate&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/optimize.html">optimize</a></td>
            <td class="m-help">Optimize action parameter by exhaustive function maximization.&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/pdf.html">pdf</a></td>
            <td class="m-help">Output the pdf of the random variable evaluated at the points specified&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/plotCdf.html">plotCdf</a></td>
            <td class="m-help">Plots the CDF of the prtRv&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/plotLogPdf.html">plotLogPdf</a></td>
            <td class="m-help">Plot the pdf of the prtRv&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/plotPdf.html">plotPdf</a></td>
            <td class="m-help">Plot the pdf of the prtRv&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/run.html">run</a></td>
            <td class="m-help">Run a prtAction object on a prtDataSet object.&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/set.html">set</a></td>
            <td class="m-help">set the object properties&nbsp;</td>
         </tr>
         <tr class="summary-item">
            <td class="attributes">
               &nbsp;
               
            </td>
            <td class="name"><a href="./prtRvIndependent/train.html">train</a></td>
            <td class="m-help">Train a prtAction object using training a prtDataSet object.&nbsp;</td>
         </tr>
      </table>
   </body>
</html>